package zuoye.xiti;
public class WriteTest {
	public static void main(String[] args) {
		LeftHand left = new LeftHand();				
		RightHand right = new RightHand();			
		left.start(); 								
		right.start();								
	}
}
class LeftHand extends Thread {
	public void run() {
		for (int i = 0; i <= 5; i++) {
			System.out.print("A");
			try {
				sleep(500);						
			} catch (InterruptedException e) {
			}
		}
	}
}
class RightHand extends Thread {
	public void run() {
		for (int i = 0; i <= 5; i++) {
			System.out.print("B");
			try {
				sleep(300);						
			} catch (InterruptedException e) {
			}
		}
	}
}
